\documentclass[t,12pt,aspectratio=169]{beamer} % 16:9 宽屏比例，适合现代投影
\usepackage{ctex} % 中文支持
\usepackage{amsmath, amssymb} % 数学公式与符号
\usepackage{graphicx, color}
\usepackage{url}
\usepackage{verbatim}

% 主题设置（推荐简洁风格）
\usetheme{Madrid}
\usecolortheme{default} % 可选：seahorse, beaver, dolphin 等

\title{第三章：多维随机变量及其分布}
\author{MSS ET AL}
\date{2018年11月}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\begin{frame}
  \titlepage
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{内容提要  }

\begin{itemize}

\item   二维随机变量的联合分布函数

\item   联合分布列，联合密度函数

\item   边际分布，独立的随机变量

\item   二维随机变量的函数的分布

\item   数学期望，方差，协方差，相关系数

\item   条件分布，条件期望，重期望公式

\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{本章习题}

\begin{itemize}

\item   (3.1) 4,5,7,10,11,13,15

\item   (3.2) 1,4,6,8,10,12,16

\item   (3.3) 1,2,6,8,11,13,16

\item   (3.4) 1,4,7,10,11,14,16,21,26,28

\item   (3.5) 3,5,7,10,11,12,16

\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：写出{\color{red}二维随机变量}的概念，并举出一个例子。


答：一个二维随机变量是指一个函数
\begin{eqnarray*}
(X,Y):\Omega\to \mathbb{R}\times \mathbb{R}.
\end{eqnarray*}

例子：考察一群孩子的身高和体重。这里\\
样本空间 $\Omega=$ 这群孩子，样本点 $\omega=$ 每个孩子。


\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：随机向量$(X,Y)$的{\color{red}联合分布函数}是什么？

\begin{itemize}
\item 联合分布函数定义为
\begin{eqnarray*}
F_{X,Y}: \mathbb{R}\times \mathbb{R} & \to & \mathbb{R} \\
(x,y) &\mapsto & P(X\le x,Y\le y)
\end{eqnarray*}
\item  联合分布函数计算了二维随机变量落在点 $(x,y)$ 的左下方{\color{blue}无限闭矩形区域}的概率。
\end{itemize}


\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：从 $(X,Y)$ 的联合分布函数 $F(x,y)$ 如何求出 $(X,Y)$ 落在任意一个矩形区域 $a< x\le b, c< y\le d$ 的概率？
即 $P(a< X\le b, c< Y\le d)=?$

答：
\begin{align*} % requires amsmath; align* for no eq. number
   & P(a< X\le b, c< Y\le d) \\
    = {}& F(b,d) - F(a,d) - F(b,c) + F(a,c) 
\end{align*}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }
问：二维联合分布函数有哪些性质？

\begin{itemize}
\item 单调性（什么是二元函数的单调性）
\item 有界性（以及上下左右的极限）
\item 右连续性（对每个变量而言）
\item 非负性（对任意矩形区域的四个顶点而言）
\end{itemize}


\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：什么是{\color{red}离散型}二维随机变量的{\color{red}联合分布列}？

答：
\begin{table}[ht]\centering
\begin{tabular}{|c|c|c|c|c|}
\hline
$X\backslash Y$  & $y_1$ & $y_2$ & $y_3$ & $\cdots$ \\
\hline
$x_1$ &&&&\\
\hline
$x_2$ &&&&\\
\hline
$\vdots$ &&&&\\
\hline
\end{tabular}
\end{table}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }
问：从1,2,3,4 中任取一个数记为 $X$, 再从1, 2, .., $X$ 中任取一个数，记为 $Y$. 求 $(X,Y)$ 的联合分布列，以及 $X=Y$ 的概率。

\begin{table}[ht]\centering
\begin{tabular}{|p{1cm}|p{1cm}|p{1cm}|p{1cm}|p{1cm}|}
\hline
$X\backslash Y$  & $1$ & $2$ & $3$ & $4$ \\
\hline
$1$ &1/4&0&0&0\\
\hline
$2$ &1/8&1/8&0&0\\
\hline
$3$ &1/12&1/12&1/12&0\\
\hline
$4$ &&&& \\
\hline\end{tabular}
\end{table}


\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }
问：什么是{\color{red}连续型}二维随机变量的联合密度函数？

答：如果二维随机变量的联合分布函数能够写成某二元函数的二重积分的形式，则称这是一个连续型的二维随机变量。
\begin{eqnarray*}
F_{X,Y}(x,y)=\iint_{-\infty<u\le x, -\infty<v\le y} p(u,v)dudv.
\end{eqnarray*}
其中的 $p(u,v)$ 称为{\color{red}联合密度函数}。

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }
问：写出{\color{red}联合分布列}和{\color{red}联合密度函数}的性质。

\begin{itemize}
\item 非负性 $p_{ij}\ge 0$ 和 $p(x,y)\ge 0$.
\item 正则性 $\sum_{i,j}p_{ij}=1$ 和 $\iint_{\mathbb{R}^2} p(x,y)dxdy=1$.
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设{\color{red}随机向量} $(X,Y)$ 的联合密度函数为
\begin{eqnarray*}
p(x,y)=\left\{\begin{array}{ll}
6e^{-2x-3y}, & x>0,y>0, \\
0, & \textrm{ 其它 }.
\end{array}\right.
\end{eqnarray*}
求概率 $P(X<1,Y>1)$ 和概率 $P(X>Y)$.

\begin{itemize}
\item 画出联合密度函数（是二元函数）的示意图。
\item 计算相应区域的二重积分。
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：一批产品共有100件， 其中一等品60件， 二等品30件， 三等品10件。 有放回地任取 $n$ 件，
用 $(X,Y)$ 表示其中一等品和二等品的件数。 
求 $(X,Y)$ 的联合分布列。

\begin{itemize}
\item $(X,Y)$ 的可能取值为 $(i,j)$, 其中 $0\le i,j\le n$.
%\item 对 $i+j\le n$, 有 
\item $p_{ij} = \frac{n!}{i!j!(n-i-j)!}\left(\frac{6}{10}\right)^i \left(\frac{3}{10}\right)^j \left(\frac{1}{10}\right)^{n-i-j}$.
\item 写出 $n=3$ 时的情形。
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设随机变量$(X,Y)$等可能地落在下述圆内：
%\begin{eqnarray*}
$D=\{(x,y)\in\mathbb{R}^2 \,|\, x^2+y^2 \le r^2 \}$.
%\end{eqnarray*}
\begin{enumerate}
\item 求联合密度函数 $p(x,y)$.
\item 求概率 $P(|X|\le r/2)$.
\end{enumerate}

\begin{itemize}
\item 这是平面区域上的均匀分布。
\item 计算相应区域的二重积分。
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设二维随机变量服从{\color{red}二维正态分布}
$$(X,Y)\sim N(\mu_1,\mu_2,\sigma_1^2,\sigma_2^2,\rho),$$ 
求 $(X,Y)$ 落在下述区域$D$ 的概率：
\begin{eqnarray*}
D &=& \Big{\{}(x,y)\in\mathbb{R}^2 \,\Big{|}\, (x-\mu_1)^2/\sigma_1^2+(y-\mu_2)^2/\sigma_2^2 \\
   && -2\rho(x-\mu_1)(y-\mu_2)/(\sigma_1\sigma_2) \le \lambda^2 \Big{\}}.
\end{eqnarray*}

答：画出这个区域，变量代换计算二重积分。

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设随机向量 $(X,Y)$ 的联合分布函数为
{\footnotesize
\begin{eqnarray*}
F(x,y)=\left\{
\begin{array}{ll}
1-e^{-x}-e^{-y}+e^{-x-y-\lambda xy}, & x>0,y>0,\\
0,& \textrm{其它}.
\end{array}\right.
\end{eqnarray*}
}
求 $X$ 与 $Y$ 各自的分布函数，此时也称为二维随机变量 $(X,Y)$ 的{\color{red}边际分布函数}。

答：$F_X(x)=F(x,\infty)$,\,\, $F_Y(y)=F(\infty,y)$.

如何画出这个二元函数 $F(x,y)$ 的图像？

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设随机向量的联合分布列如下：

\begin{table}[ht]\centering
\begin{tabular}{|p{1cm}|p{1cm}|p{1cm}|p{1cm}|}
\hline
$X\backslash Y$ & 1 & 2 & 3 \\
\hline
0 & 0.09 & 0.21 & 0.24 \\
\hline
1 & 0.07 & 0.12 & 0.27 \\
\hline
\end{tabular}
\end{table}

求 $X$ 与 $Y$ 各自的分布列（即{\color{red}边际分布列}）。

答：$P[X=x_i] = p_{i\cdot} = \sum\limits_j p_{ij}$.

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设随机向量 $(X,Y)$ 的联合密度函数为
\begin{eqnarray*}
p(x,y)=\left\{
\begin{array}{ll}
1, & 0<x<1,|y|<x,\\
0,& \textrm{其它}.
\end{array}\right.
\end{eqnarray*}

\begin{enumerate}
\item 求$X$与$Y$各自的密度函数({\color{red}边际密度函数})。
\item 求概率$P(X<1/2)$与概率$P(Y>1/2)$.
\end{enumerate}

答：$p_X(x)=\int_\mathbb{R} p(x,y)dy$. 画出函数图像。

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：证明二维正态分布的边际分布是一维正态分布。

\begin{itemize}
\item 写出二维正态分布的联合密度函数 $p(x,y)$. \\ （注意5个参数）
\item 用变量代换计算积分： \\ $p_X(x)=\int_\mathbb{R} p(x,y)dy=$ \\ $p_Y(y)=\int_\mathbb{R} p(x,y)dx=$
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：什么时候称{\color{red}随机变量之间相互独立}？

\begin{itemize}
\item 如果二维随机变量的{\color{blue}联合分布函数}是{\color{blue}边际分布函数}的乘积，则称这两个随机变量相互独立：
\begin{eqnarray*}
F(x,y)=F_X(x)F_Y(y), \forall x\in\mathbb{R},y\in\mathbb{R},
\end{eqnarray*}
\item 对任意直线上的博雷尔集 $A,B$ 有\\ $P[X\in A, Y\in B] = P[X\in A]\cdot P[Y\in B]$.
\end{itemize}


\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：判断连续型和离散型随机变量之间相互独立的方法是什么？

\begin{itemize}
\item 离散型：$p_{ij}=p_{i\cdot}p_{\cdot j}$, $\forall i,j$.
\item 连续型：$p(x,y)=p_X(x)p_Y(y)$, $\forall x,y$.
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：从区间 $(0,1)$ 中任取两个数，求下述事件的概率：
\begin{enumerate}
\item 两数之和小于1.2.
\item 两数之积小于1/4.
\end{enumerate}

答：这是单位正方形区域上的均匀分布。

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：若二维随机变量 $(X,Y)$ 的联合概率密度函数如下，问 $X$ 与 $Y$ 是否相互独立？
\begin{eqnarray*}
p(x,y)=\left\{
\begin{array}{ll}
8xy, & 0\le x \le y \le 1,\\
0,& \textrm{其它}.
\end{array}\right.
\end{eqnarray*}

\begin{itemize}
\item 画出函数 $p(x,y)$ 的示意图。
\item 判断 $p(x,y)=p_X(x)p_Y(y)$ 是否成立。
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：若二维随机变量 $(X,Y)$ 的联合概率密度函数如下，问 $X$ 与 $Y$ 是否相互独立？
\begin{eqnarray*}
(a)\,\,\,\,\, p(x,y) &=& \left\{
\begin{array}{ll}
6xy^2, & 0< x ,y <1,\\
0,& \textrm{其它}.
\end{array}\right.\\
(b)\,\,\,\,\, p(x,y) &=& \left\{
\begin{array}{ll}
12y^2, & 0\le y\le x\le 1,\\
0,& \textrm{其它}.
\end{array}\right.
\end{eqnarray*}


答：

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }
问：举例说明{\color{red}二维随机变量的函数}这个概念在实际中的应用。

答：

$Z=\min(X,Y)$.


\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：已知二维随机变量的联合分布列：
\begin{table}[ht]\centering
\begin{tabular}{|p{1cm}|p{1cm}|p{1cm}|p{1cm}|}
\hline
$X\backslash Y$ & $-1$ & 1 & 2 \\
\hline
$-1$ & 0.25 & 0.10 & 0.30 \\
\hline
2 & 0.15 & 0.15 & 0.05 \\
\hline
\end{tabular}
\end{table}

求下述随机变量的分布列：
(1) $Z_1=X+Y$;
(2) $Z_2=X-Y$;
(3) $Z_3=\max\{X,Y\}$.

答：先写出 $Z_1$, $Z_2$, $Z_3$ 的可能取值。

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设随机变量 $X$ 与 $Y$ 相互独立，都服从泊松分布，参数分别为 $\lambda_1$ 和 $\lambda_2$. 求 $Z=X+Y$ 的分布。用实际例子说明这个结论。

\begin{itemize}
\item 先写出 $Z$ 的可能取值：$0,1,2,\cdots$.
\item $Z=n$ 等价于\\ $(X,Y)=(0,n),(1,n-1),\cdots,(n,0)$.
\item 使用独立性。
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设随机变量 $X_1,X_2,\cdots,X_n$ 相互独立，\\ 设 $X_i\sim F_i(x), i=1,2,\cdots,n$，这些是分布函数。\\
求最大值 $Y$ 和最小值 $Z$ 的分布：

\begin{itemize}
\item $Y=\max\{X_1,X_2,\cdots,X_n\}$. 
\item $Z=\min\{X_1,X_2,\cdots,X_n\}$. 
\end{itemize}
 
%(2) $X_i$相同分布，$X_i\sim F(x)$;\\
%(3) $X_i$有相同密度函数 $p(x)$;\\
%(4) $X_i$相同分布，$X_i\sim Exp(\lambda)$.

答：$P[Y\le y] = P[X_1\le y, \cdots, X_n\le y] $

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：某道路原来5个路灯，后来改建成20个路灯。设每只灯泡的平均寿命是2000小时，设每只灯泡每天使用10小时。求30天内需要更换灯泡的概率。（设每只灯泡的寿命服从指数分布。）

答：设第 $i$ 个路灯的寿命是 $X_i$, 则 $X_i\sim Exp(\lambda)$.

$T_1=\min\{X_1, \cdots, X_5\}$

$T_2=\min\{X_1, \cdots, X_{20}\}$

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设随机变量 $X$ 与 $Y$ 相互独立。设其密度函数分别为$p_X(x)$ 和 $p_Y(y)$. 求$Z=X+Y$的密度函数。

\begin{itemize}
\item 先计算分布函数，再求导得密度函数。
\item $F_Z(z)=P[Z\le z]=P[X+Y\le z]=$
\item 由独立性得 $p(x,y)=p_X(x)p_Y(y)$.
\item 什么是卷积公式？
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

设随机变量 $X$ 与 $Y$ 相互独立，设 $X\sim N(\mu_1,\sigma_1^2)$,  $Y\sim N(\mu_2,\sigma_2^2)$.  证明：
\begin{enumerate}
\item $X+Y \sim N(\mu_1+\mu_2, \sigma_1^2+\sigma_2^2)$.
\item $aX+b \sim N(a\mu_1+b, a^2\sigma_1^2)$.
\end{enumerate}

答：计算 $X+Y$ 与 $aX+b$ 的密度函数，发现正好等于正态分布的密度函数。

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

   问：设有独立同分布的正态随机变量 $X$ 与 $Y$, 设 $U=X+Y$, $V=X-Y$. 求 $(U,V)$ 的联合密度函数，并问 $U$ 与 $V$ 是否独立。

\begin{itemize}
\item 应用{\color{red}联合密度函数的变量代换公式}。
\item $q(u,v)=p(x(u,v),y(u,v))\cdot |J|$, $J=\frac{\partial (x,y)}{\partial (u,v)}$.
\item 条件是 $(x,y)\leftrightarrow (u,v)$  要一一对应。
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设随机变量 $X$ 与 $Y$ 相互独立，
密度函数分布为 $p_X(x)$ 与 $p_Y(y)$. 
设 $U=XY$, $W=X/Y$. 
求 $U$ 与 $W$ 的密度函数。

\begin{itemize}
\item 应用{\color{red}增补变量法}，考虑 $V=Y$.
\item 则 $(U,V)=(XY,Y)$ 与 $(X,Y)$ 一一对应。
\item 应用变量代换公式求出联合密度 $q(u,v)$.
\item 求出边缘密度函数 $q_U(u)$.
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：
设二维随机变量 $(X,Y)$ 的联合分布列为
\begin{eqnarray*}
P(X=x_i,Y=y_j)=p_{ij},\,\,\,\,\, i\in I, j\in J.
\end{eqnarray*}
设随机变量$Z=g(X,Y)$, 求 $Z$ 的数学期望。

答：{\color{red}
\begin{eqnarray*}
E(Z)=\sum\limits_{i\in I, j\in J} g(x_i,y_j)p_{ij}.
\end{eqnarray*}
}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设随机向量 $(X,Y)$ 的联合密度函数为
\begin{eqnarray*}
p(x,y),\,\,\,\,\, x\in\mathbb{R}, y\in\mathbb{R}.
\end{eqnarray*}
设随机变量$Z=g(X,Y)$, 求 $Z$ 的数学期望。

答：{\color{red}
\begin{eqnarray*}
E(Z)=\underset{\mathbb{R}\times \mathbb{R}}\iint g(x,y)p(x,y)dxdy.
\end{eqnarray*}
}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：证明{\color{red}数字特征}的基本性质：
\begin{itemize}
\item 对任意 $X,Y$, 有 $E(X+Y)=E(X)+E(Y)$.
\item 若 $X$ 与 $Y$ 独立，则有 $E(XY)=E(X)E(Y)$.
\item 若 $X$ 与 $Y$ 独立，则有\\ $Var(X+Y)=Var(X)+Var(Y)$.
\end{itemize}

答：分别对离散型和连续型随机变量验证。

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：随机变量 $X$ 与 $Y$ 的{\color{red}协方差}是怎么定义的？其含义是什么？协方差和方差是什么关系？

\begin{itemize}
\item 
$ Cov(X,Y) = E[(X-\mu_X)(Y-\mu_Y)]$ \\ 
\hspace*{1.95cm} $ = E(XY)-E(X)E(Y)$.
\item 
$Cov(X,X) = E[(X-\mu_X)(X-\mu_X)]$ \\
\hspace*{1.95cm} $ = E[(X-\mu_X)^2]$ \\
\hspace*{1.95cm} $=Var(X)$.
\end{itemize}


\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：证明下述协方差的性质：
\begin{enumerate}
\item 若 $X$ 与 $Y$ 独立，则$Cov(X,Y)=0$.
\item 对任意二维随机变量 $(X,Y)$, 有\\ $Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y).$
\item 对任意随机变量 $X,Y,Z$, 常数 $a,b,c$, 有\\ $Cov(aX+bY,cZ)=acCov(X,Z)+bcCov(Y,Z).$
\end{enumerate}

%答：若 $X$ 与 $Y$ 独立则{\color{red}联合密度}等于{\color{red}边缘密度}乘积。% $p(x,y)=p_X(x)p_Y(y)$.

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：随机变量$X$与$Y$的{\color{red}相关系数}是什么？证明独立蕴含不相关。(以连续型随机变量为例)

\begin{itemize}
\item $ Corr(X,Y)=\frac{Cov(X,Y)}{\sqrt{Var(X)}\sqrt{Var(Y)}}$.
\item $X$与$Y$独立 $\Longleftrightarrow$ $p(x,y)=p_X(x)p_Y(y)$ \\
\hspace*{2cm} $\Longrightarrow$ $E(XY)=E(X)E(Y)$ \\
\hspace*{2cm} $\Longrightarrow$ $Cov(X,Y)=0$ \\
\hspace*{2cm} $\Longrightarrow$ $Corr(X,Y)=0$.
\end{itemize}


\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：在长为$a$的线段上任取两点，求这两点间的平均长度。

\begin{itemize}
\item 设 $X,Y$ 是这两点的坐标，则都服从区间 $[0,a]$ 上的均匀分布，且相互独立。
\item 写出 $(X,Y)$ 的联合密度函数。
\item 计算函数 $|X-Y|$ 的数学期望。按公式。
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设 $X_1,X_2$ 是独立同分布的随机变量, \\ $X_k\sim Exp(\lambda)$. 求 $Y=\max(X_1,X_2)$ 的数学期望。

\begin{itemize}
\item 计算随机变量 $Y$ 的分布函数。
\item 求导得到随机变量 $Y$ 的密度函数。
\item 按公式计算 $Y$ 的数学期望。
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设随机变量 $X_1,X_2,X_3$ 相互独立, \\
$X_1\sim U(0,6)$, $X_2\sim N(1,3)$, $X_3\sim Exp(3)$. \\
求 $Y=X_1-2X_2+3X_3$ 的期望、方差和标准差。

\begin{itemize}
\item $E[Y]=E[X_1]-2E[X_2]+3E[X_3]=$
\item $D[Y]=D[X_1]+4D[X_2]+9D[X_3]=$
\item  $\sigma_Y = \sqrt{D[Y]}=$
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设袋中有$m$个颜色各不相同的球，每次任取一球并放回，记 $X$为$n$次摸球中得到的不同颜色的数目。求 $E(X)$.

答：
\begin{itemize}
\item 若第$i$种颜色被摸到,则记 $X_i=1$, 否则$X_i=0$.
\item $X=X_1+X_2+\cdots+X_m$.
\item  $E[X_i]=P[X_i=1]=1-P[X_i=0]=$
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设随机变量 $X\sim b(n,p)$, 求 $X$ 的数学期望和方差。

答：

\begin{itemize}
\item $X$ = $n$重伯努利试验中概率$p$事件发生的次数。
\item $X=X_1+X_2+\cdots+X_n$.
\item $X_k$ 记录了第$k$次试验中该事件是否发生。
\item $E[X_k]=p$, $D[X_k]=p-p^2$.
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设 $X\sim N(0,\sigma^2)$, 设 $Y=X^2$, 判断 $X,Y$ 是否独立，并求 $Cov(X,Y)$.

\begin{itemize}
\item $X$的取值决定了$Y$的取值，因此它们不独立。
\item $Cov(X,Y)=Cov(X,X^2)$ \\
\hspace*{1.95cm} $=E(XX^2)-E(X)E(X^2)$ \\
\hspace*{1.95cm} $=0-0\cdot \sigma^2 =0$
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设二维随机变量 $(X,Y)$ 的联合密度函数如下，求 $Cov(X,Y)$.
\begin{eqnarray*}
p(x,y)=\left\{
\begin{array}{ll}
3x, & 0<y <x <1,\\
0,& \textrm{其它}.
\end{array}\right.
\end{eqnarray*}

\begin{itemize}
\item 写出公式 $Cov(X,Y)=E(XY)-E(X)E(Y)$.
\item 由 $(X,Y)$ 联合密度函数计算 $E(XY)$.
\item 由 $X,Y$各自密度函数计算 $E(X)$, $E(Y)$.
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设二维随机变量 $(X,Y)$ 的联合密度函数如下，求 $Var(2X-3Y+8)$.
\begin{eqnarray*}
p(x,y)=\left\{
\begin{array}{ll}
(x+y)/3, & 0<x<1, 0<y<2,\\
0,& \textrm{其它}.
\end{array}\right.
\end{eqnarray*}


\begin{align*}
&{\,\,} Var(2X-3Y+8) = Var(2X-3Y) \\
=&{\,\,} Cov(2X-3Y,2X-3Y) \\
=&{\,\,} Cov(2X,2X)+Cov(3Y,3Y)-12Cov(X,Y)
\end{align*}


\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：证二维正态分布的相关系数即为参数 $\rho$.

答：设 $(X,Y)\sim N(\mu_1,\mu_2,\sigma_1^2,\sigma_2^2,\rho)$. 
要证明：
$$Corr(X,Y)=\rho.$$

\begin{itemize}
\item 由二维正态分布的联合密度函数，计算\\ $Cov(X,Y)=E[(X-E(X))(Y-E(Y))]=\iint$
\item 再计算 $Var(X)=\sigma_1^2$, $Var(Y)=\sigma_2^2$.
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设二维随机变量 $(X,Y)$ 的联合密度函数如下，求 $Corr(X,Y)$.
\begin{eqnarray*}
p(x,y)=\left\{
\begin{array}{ll}
8/3, & 0<x-y<0.5, 0<x,y<1,\\
0,& \textrm{其它}.
\end{array}\right.
\end{eqnarray*}

\begin{itemize}
\item 计算 $E(X),E(X^2),E(Y),E(Y^2),E(XY)$.
\item 计算 $Cov(X,Y)$ 与 $Corr(X,Y)$.
\item 看联合密度函数的图像，与线性回归的联系。
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设二维随机变量 $(X,Y)$ 的联合分布列为
\begin{eqnarray*}
P(X=x_i,Y=y_j)=p_{ij},\,\,\,\,\, i\in I, j\in J.
\end{eqnarray*}
在 $Y=y_j$ 的条件下，$X$ 的{\color{red}条件分布列}是什么？

答：$X$ 的可能取值仍为 $x_i,i\in I$, 概率为条件概率
\begin{eqnarray*}
P(X=x_i \,|\, Y=y_j)=\frac{p_{ij}}{p_{\cdot j}},\,\,\,\,\, i\in I.
\end{eqnarray*}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设二维随机变量的联合分布列如下，求条件分布列。
\begin{table}[ht]\centering
\begin{tabular}{|p{1cm}|p{1cm}|p{1cm}|p{1cm}|}
\hline
$X\backslash Y$ & 1 & 2 & 3 \\
\hline
1 & 0.1 & 0.3 & 0.2 \\
\hline
2 & 0.2 & 0.05 & 0.15 \\
\hline
\end{tabular}
\end{table}


答：一共有5个条件分布列。


\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }
问：设随机变量$X$与$Y$相互独立，且 $X\sim P(\lambda_1)$, $Y\sim P(\lambda_2)$. 在已知 $X+Y=n$ 的条件下，求 $X$ 的条件分布。

\begin{itemize}
\item $P(\lambda)$ 是指参数为 $\lambda$ 的泊松分布。
\item 在此条件下，$X$ 的可能取值为 $0,1,\cdots,n$.
\item 计算条件概率 $P(X=k\,|\, X+Y=n)$.
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }
问：设在一段时间内进入某商店的顾客人数 $X$ 服从泊松分布 $P(\lambda)$, 每个顾客购买某种物品的概率为$p$, 并且各顾客是否购买该种物品相互独立。记 $Y$ 为进入商店并购买该物品的顾客人数。求 $Y$ 的分布列。

\begin{itemize}
\item $Y$ 的可能取值为 $0,1,2,\cdots,k,\cdots$.
\item 计算概率 $P(Y=k)$. 对 $X$ 的不同取值分类讨论，应用全概率公式。
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }

问：设随机向量 $(X,Y)$ 的联合密度函数为
\begin{eqnarray*}
p(x,y),\,\,\,\,\, (x,y)\in\mathbb{R}\times\mathbb{R}.
\end{eqnarray*}
则在 $Y=y$ 的条件下，$X$ 的{\color{red}条件分布函数}和{\color{red}条件密度函数}分别是什么？

\begin{eqnarray*}
F(x|y) = \int_{-\infty}^{x} \frac{p(u,y)}{p_Y(y)} du, \,\,\,\,\,\,
p(x|y) = \frac{p(x,y)}{p_Y(y)}.
\end{eqnarray*}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }
问：有区域 $G=\{(x,y)|x^2+y^2\le 1\}$.
设二维随机变量$(X,Y)$ 服从区域$G$ 上的均匀分布。求给定 $Y=y$的条件下，$X$ 的条件密度函数 $p(x|y)$.

\begin{itemize}
\item 注意 $y$ 的不同取值，分情况讨论。
\item 解法一：使用公式 $p(x|y) = \frac{p(x,y)}{p_Y(y)}$.
\item 解法二：画出联合密度函数的图像，从直观理解给出解答。
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }
问：设有正态分布的随机变量 $X\sim N(\mu,\sigma^2)$, 在 $X=x$ 的条件下，$Y$ 的条件分布为 $N(x,\sigma_2^2)$. 求 $Y$ 的密度函数。

\begin{itemize}
\item 条件密度函数为 $p(y|x)=\frac{1}{\sqrt{2\pi}\sigma_2} \exp\left[-\frac{(y-x)^2}{2\sigma_2^2}\right]$.
\item 联合密度函数为 $p(x,y)=p_X(x)p(y|x)$.
\item 一个边缘密度函数为 $p_Y(y)=\int_\mathbb{R} p(x,y)dx$.
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }
问：写出{\color{red}条件期望}的含义和计算公式。

答：离散情形和连续情形分别为：
\begin{eqnarray*}
E(X|Y=y) &=& \sum\limits_{i\in I} x_i P(X=x_i|Y=y). \\
E(X|Y=y) &=& \int_{-\infty}^{\infty} xp(x|y)dx.
\end{eqnarray*}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }
问：$E(X|Y)$ 是一个怎样的随机变量？

\begin{itemize}
\item 对每个实数 $y$, 都可以算出一个确定的实数 \\ $E(X|Y=y)=:g(y)$.
\item 随机变量 $g(Y)=E(X|Y)$ 将子集 $(Y=y)\subseteq\Omega$ 中的样本点都对应到实数 $E(X|Y=y)$.
\item 用一个最简单的例子解释 $E(X|Y)$.
\end{itemize}


\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }
问：写出{\color{red}重期望公式}，说明如何使用该公式。

\begin{itemize}
\item 对二维随机变量$(X,Y)$ 有 $E[E(X|Y)] = E(X)$.
\item 离散型：$E(X)=\sum\limits_{j\in J} E(X|Y=y_j)P(Y=y_j)$.
\item 连续型：$E(X)=\int_\mathbb{R} E(X|Y=y)p_Y(y)dy$.
\item 思路是对 $Y$ 分情况讨论，计算 $E(X)$.
\end{itemize}



\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }
问：一个矿工困在有三个门的矿井里。沿第一个门走3小时可到安全区，沿第二个门走5小时又回到原处，沿第三个门走7小时也回到原处。设他总在这三个门中等可能地选一个走（无记忆），求他平均需要多少时间到达安全区。

\begin{itemize}
\item 设矿工要 $X$ 小时到达安全区。这是随机变量。
\item 设 $Y$ 是他第一次选的门。写出 $Y$ 的分布列。
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }
问：口袋里有编号为$1\sim n$的 $n$ 个球，从中任取一个球。若取到1号，则得1分并停止摸球；若取到 $i (i\ge 2)$ 号球，则得 $i$ 分，放回该球并重新摸球。求得到的总分数的平均值。

\begin{itemize}
\item 设 $X$ 是总得分数，这是随机变量。
\item 设 $Y$ 是第一次取到球的号码，也是随机变量。
\item  应用公式 $E(X)=E[E(X|Y)]$.
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{3. }
问：设有独立同分布的随机变量 $X_1,X_2,\cdots$, 设有取正整数值的随机变量 $N$, 设 $N$, $X_1$, $X_2$, $\cdots$ 相互独立。记 $Y=X_1+\cdots+X_N$. 证明 $E(Y)=E(X_k)E(N)$.

\begin{itemize}
\item 对 $N=1,2,\cdots,n,\cdots$ 分别计算 $E[Y|N=n]$.
\item 应用重期望公式 $E(Y)=E[E(Y|N)]$.
%\item  
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


